import math

while True:
    try:
        a = float(input("请输入三角形第一条边长a: "))
        b = float(input("请输入三角形第二条边长b: "))
        c = float(input("请输入三角形第三条边长c: "))

        if a <= 0 or b <= 0 or c <= 0:
            print("边长必须为正数，请重新输入！")
            continue

        if (a + b > c) and (a + c > b) and (b + c > a):
            s = (a + b + c) / 2
            area = math.sqrt(s * (s - a) * (s - b) * (s - c))
            print(f"该三角形的面积为: {area:.2f}")
            break
        else:
            print("无法构成三角形")
            break

    except ValueError:
        print("输入错误，请输入有效的数字！")